﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Inspired.Euler.Tests
{
    /// <summary>
    /// Tests for problems from 30 to 39
    /// </summary>
    [TestClass]
    public class Problems030To039
    {
        [TestMethod]
        [Description("Find the sum of all the numbers that can be written as the sum of fifth powers of their digits.")]
        public void Problem030()
        {
            Assert.AreEqual(443839, Euler.Problem030.Solve());
        }

        [TestMethod]
        [Description("Investigating combinations of English currency denominations.")]
        public void Problem031()
        {
            Assert.AreEqual(-1, Euler.Problem031.Solve());
        }

        [TestMethod]
        [Description("Find the sum of all numbers that can be written as pandigital products.")]
        public void Problem032()
        {
            Assert.AreEqual(-1, Euler.Problem032.Solve());
        }

        [TestMethod]
        [Description("Discover all the fractions with an unorthodox cancelling method.")]
        public void Problem033()
        {
            Assert.AreEqual(100, Euler.Problem033.Solve());
        }

        [TestMethod]
        [Description("Find the sum of all numbers which are equal to the sum of the factorial of their digits.")]
        public void Problem034()
        {
            Assert.AreEqual(40730, Euler.Problem034.Solve());
        }

        [TestMethod]
        [Description("How many circular primes are there below one million?")]
        public void Problem035()
        {
            Assert.AreEqual(55, Euler.Problem035.Solve());
        }

        [TestMethod]
        [Description("Find the sum of all numbers less than one million, which are palindromic in base 10 and base 2.")]
        public void Problem036()
        {
            Assert.AreEqual(872187, Euler.Problem036.Solve());
        }

        [TestMethod]
        [Description("Find the sum of all eleven primes that are both truncatable from left to right and right to left.")]
        public void Problem037()
        {
            Assert.AreEqual(-1, Euler.Problem037.Solve());
        }

        [TestMethod]
        [Description("What is the largest 1 to 9 pandigital that can be formed by multiplying a fixed number by 1, 2, 3, ... ?")]
        public void Problem038()
        {
            Assert.AreEqual(932718654, Euler.Problem038.Solve());
        }

        [TestMethod]
        [Description("If <i>p</i> is the perimeter of a right angle triangle, {<i>a</i>, <i>b</i>, <i>c</i>}, which value, for <i>p</i> = 1000, has the most solutions?")]
        public void Problem039()
        {
            Assert.AreEqual(-1, Euler.Problem039.Solve());
        }
    }
}
